package inherit;

public class DogCat {
    public DogCat(String name) {
        this.name = name;
    }

    public String name="望舒";
    public void eat(){
        System.out.println(name+"在吃饭");
    }
    public void sleep(){

        System.out.println(name+"在睡觉");
    }
}
